Update dependency jsonargparse to v4 #9
+2
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==2.32.2
->==4.35.0
==3.11.2
->==4.35.0
Release Notes
omni-us/jsonargparse (jsonargparse)
v4.35.0
Compare Source
Added
^^^^^
print config
argument to reuse the name of the config argumentby using
%s
(#​630 <https://github.com/omni-us/jsonargparse/pull/630>
__).Changed
^^^^^^^
arguments no longer adds a config loader (
#​634 <https://github.com/omni-us/jsonargparse/pull/634>
__).CLASS_PATH_OR_NAME
for subclass help is now optional and if not giventhe help of the base class is printed (
#​628 <https://github.com/omni-us/jsonargparse/pull/628>
__).Fixed
^^^^^
ArgumentParser._parse_known_args
since Python 3.12.8and 3.13.1 (
#​644 <https://github.com/omni-us/jsonargparse/pull/644>
__).Deprecated
^^^^^^^^^^
add_dataclass_arguments
is deprecated and will be removed in v5.0.0.Instead use
add_class_arguments
(#​634 <https://github.com/omni-us/jsonargparse/pull/634>
__).config argument as
--print_%s
instead of being always--print_config
(
#​630 <https://github.com/omni-us/jsonargparse/pull/630>
__).v4.34.1
Compare Source
Fixed
^^^^^
#​625 <https://github.com/omni-us/jsonargparse/pull/625>
__).NotRequired
incorrectly havinginspect._empty
as default (#​625 <https://github.com/omni-us/jsonargparse/pull/625>
__).#​637 <https://github.com/omni-us/jsonargparse/pull/637>
__).#​638 <https://github.com/omni-us/jsonargparse/pull/638>
__).v4.34.0
Compare Source
Added
^^^^^
Unpack[TypedDict]
annotations for**kwargs
(
#​586 <https://github.com/omni-us/jsonargparse/pull/586>
__).Fixed
^^^^^
#​592 <https://github.com/omni-us/jsonargparse/pull/592>
__).TypedDict
keys are now correctly inferred when oneinherits one
TypedDict
from another with different totality (#​597 <https://github.com/omni-us/jsonargparse/pull/597>
__).#​603 <https://github.com/omni-us/jsonargparse/pull/603>
__).#​608 <https://github.com/omni-us/jsonargparse/pull/608>
__).(
#​611 <https://github.com/omni-us/jsonargparse/pull/611>
__).(
#​599 <https://github.com/omni-us/jsonargparse/pull/599>
__).Changed
^^^^^^^
a subclass spec with
class_path
(#​603 <https://github.com/omni-us/jsonargparse/pull/603>
__).v4.33.2
Compare Source
Fixed
^^^^^
parse_argv_item
to address the behavior change inargparse
sincePython 3.12.7 (
#​591 <https://github.com/omni-us/jsonargparse/pull/591>
__).v4.33.1
Compare Source
Fixed
^^^^^
jsonnet-sdist
for python 3.13 to be allowed to push package to pypi(
#​584 <https://github.com/omni-us/jsonargparse/pull/584>
__).v4.32.1
Compare Source
Fixed
^^^^^
dict
types not correctly forwarding previous nested values when parsing(
#​559 <https://github.com/omni-us/jsonargparse/pull/559>
__).List
type incorrectly using defaults from previous item (#​560 <https://github.com/omni-us/jsonargparse/pull/560>
__).--print_shtab
not adding file completer for_ActionConfigLoad
(#​562 <https://github.com/omni-us/jsonargparse/pull/562>
__).parser_mode
not inherited by nested parsers (#​564 <https://github.com/omni-us/jsonargparse/pull/564>
__).v4.32.0
Compare Source
Added
^^^^^
MappingProxyType
as a type and as default for mapping types(
#​540 <https://github.com/omni-us/jsonargparse/pull/540>
__).OrderedDict
as a type (#​545 <https://github.com/omni-us/jsonargparse/pull/545>
__).get_loader
to get the current loader for a given parser mode(
#​479 comment <https://github.com/omni-us/jsonargparse/issues/479#issuecomment-2022596544>
,#​536 comment <https://github.com/omni-us/jsonargparse/issues/536#issuecomment-2186961644>
).Fixed
^^^^^
dump
failing when a link target requires serialization andskip_link_targets=False
(#​542 <https://github.com/omni-us/jsonargparse/pull/542>
__).default_config_files
making parse fail for subcommands and nested subclasstypes (
lightning-forums#5963 <https://lightning.ai/forums/t/problem-lightningcli-with-default-config-files/5963>
__).Fixes related to transformers
PreTrainedModel.from_pretrained
(
lightning#19863 comment <https://github.com/Lightning-AI/pytorch-lightning/discussions/19863#discussioncomment-9821765>
__):#​548 <https://github.com/omni-us/jsonargparse/pull/548>
__).#​551 <https://github.com/omni-us/jsonargparse/pull/551>
__).class_path
in some cases failswith unexpected
instantiate
parameter error (#​551 <https://github.com/omni-us/jsonargparse/pull/551>
__).config_file_name
parameter fortransformers model
from_pretrained
(#​551 <https://github.com/omni-us/jsonargparse/pull/551>
__).v4.31.0
Compare Source
Added
^^^^^
CLI
(#​531 <https://github.com/omni-us/jsonargparse/pull/531>
__).Protocol
types only accepting exact matching signature ofpublic methods (
#​526 <https://github.com/omni-us/jsonargparse/pull/526>
__).Fixed
^^^^^
torch
functions not working (#​535 <https://github.com/omni-us/jsonargparse/pull/535>
__).--print_shtab
crashing on failure to get signature parameters from oneclass (
lightning#10858 comment <https://github.com/Lightning-AI/pytorch-lightning/discussions/10858#discussioncomment-9846252>
__).Changed
^^^^^^^
--*.help
output shows options withoutinit_args
(#​533 <https://github.com/omni-us/jsonargparse/pull/533>
__).v4.30.0
Compare Source
Added
^^^^^
action="config"
avoiding need to importaction class (
#​512 <https://github.com/omni-us/jsonargparse/pull/512>
__).class_path
(
lightning#13613 <https://github.com/Lightning-AI/pytorch-lightning/discussions/13613>
__).--print_shtab
option whenshtab
is installed, providingcompletions for many type hints without the need to modify code (
#​528 <https://github.com/omni-us/jsonargparse/pull/528>
__).Fixed
^^^^^
subclass, PathLike and string (
#​516 <https://github.com/omni-us/jsonargparse/issues/516>
__).--print_config
failing in some cases (#​517 <https://github.com/omni-us/jsonargparse/issues/517>
__).(
#​523 <https://github.com/omni-us/jsonargparse/pull/523>
__).#​527 <https://github.com/omni-us/jsonargparse/pull/527>
__).add_subclass_arguments
inpython>=3.11
(#​522 <https://github.com/omni-us/jsonargparse/pull/522>
__).__pydantic_private__
error(
#​521 <https://github.com/omni-us/jsonargparse/issues/521>
__).v4.29.0
Compare Source
Added
^^^^^
TypedDict
(#​457 <https://github.com/omni-us/jsonargparse/issues/457>
__).or callable with class return now implicitly tries using the base class as
class_path
if not abstract (#​505 <https://github.com/omni-us/jsonargparse/pull/505>
__).Fixed
^^^^^
Union
types (#​498 <https://github.com/omni-us/jsonargparse/pull/498>
__).space (
#​499 <https://github.com/omni-us/jsonargparse/pull/499>
__).format_usage()
not working (#​501 <https://github.com/omni-us/jsonargparse/issues/501>
__).(
#​504 <https://github.com/omni-us/jsonargparse/pull/504>
__).subclass (
#​503 comment <https://github.com/omni-us/jsonargparse/issues/503#issuecomment-2119724341>
__).parse (
#​507 <https://github.com/omni-us/jsonargparse/issues/507>
__).Changed
^^^^^^^
messages for the cases of groups and subcommands (
#​506 <https://github.com/omni-us/jsonargparse/pull/506>
__).v4.28.0
Compare Source
Added
^^^^^
can ask to use standard input/output instead of file (
#​463 <https://github.com/omni-us/jsonargparse/issues/463>
__).CLI
to provide subcommands help when components given in a dict(
litgpt#996 comment <https://github.com/Lightning-AI/litgpt/issues/996#issuecomment-1996201548>
__).TypeAliasType
support added (#​480 <https://github.com/omni-us/jsonargparse/issues/480>
__).Fixed
^^^^^
argparse.ArgumentParser._parse_optional
affecting python
>=3.11.9
and>=3.12.3
(#​484 <https://github.com/omni-us/jsonargparse/issues/484>
__).lazy_instance
not working for callable classes (#​473 comment <https://github.com/omni-us/jsonargparse/issues/481#issuecomment-2030932435>
__).Callable
type with class return and zero arguments not working(
lightning#19574 comment <https://github.com/lightning-AI/pytorch-lightning/issues/19574#issuecomment-2002932565>
__).(
#​480 <https://github.com/omni-us/jsonargparse/issues/480>
__).Field
initializersare not right (
#​480 <https://github.com/omni-us/jsonargparse/issues/480>
__).Annotated
fields in dataclass-likes (eg FastAPI types) resolve incorrectly(
#​480 <https://github.com/omni-us/jsonargparse/issues/480>
__).v4.27.7
Compare Source
Fixed
^^^^^
14456c2 <https://github.com/omni-us/jsonargparse/commit/14456c21ff7a11ba420f010d2b21bcfdb14977a2>
__that prevented
**kwargs
parameter resolving when anOptional[Callable]
type is used (
#​473 <https://github.com/omni-us/jsonargparse/issues/473>
__).v4.27.6
Compare Source
Fixed
^^^^^
class_from_function
from aclassmethod
without parameter types (#​454 <https://github.com/omni-us/jsonargparse/issues/454>
__).default_env=True
(#​465 <https://github.com/omni-us/jsonargparse/issues/465>
__).produces an invalid string default.
#​464 <https://github.com/omni-us/jsonargparse/issues/464>
__).(
#​467 <https://github.com/omni-us/jsonargparse/issues/467>
__).v4.27.5
Compare Source
Fixed
^^^^^
#​446 <https://github.com/omni-us/jsonargparse/issues/446>
__).lazy_instance
.target of another link.
v4.27.4
Compare Source
Fixed
^^^^^
argcomplete
not working when type and choices given (#​442 <https://github.com/omni-us/jsonargparse/issues/442>
__).CLI
is used with a class that defines asubcommand
method (#​430 comment <https://github.com/omni-us/jsonargparse/issues/430#issuecomment-1903974112>
__).CLI
crashes when a method has aconfig
parameter. Due to redundancy,--config
argument should not be added.v4.27.3
Compare Source
Fixed
^^^^^
init_args
in an optional list (#​433 <https://github.com/omni-us/jsonargparse/issues/433>
__).instantiation and serialization (
lightning#19289 comment <https://github.com/Lightning-AI/pytorch-lightning/pull/19289#issuecomment-1902618722>
__).v4.27.2
Compare Source
Fixed
^^^^^
invalid (
lightning#19289 comment <https://github.com/Lightning-AI/pytorch-lightning/pull/19289#issuecomment-1894063743>
__).v4.27.1
Compare Source
Fixed
^^^^^
existing arguments.
sub_configs=True
not working for callable types that return a class (#​419 <https://github.com/omni-us/jsonargparse/issues/419>
__).v4.27.0
Compare Source
Added
^^^^^
SecretStr
type.SecretStr
type injsonargparse.typing
to provide secret supportwithout additional dependency.
Fixed
^^^^^
v4.26.2
Compare Source
Fixed
^^^^^
target.
choices
working incorrectly whennargs
is+
,*
or number.#​297 <https://github.com/omni-us/jsonargparse/issues/297>
__).v4.26.1
Compare Source
Fixed
^^^^^
dict_keys
object and value non-hashable.v4.26.0
Compare Source
Added
^^^^^
#​394 <https://github.com/omni-us/jsonargparse/issues/394>
,lightning#18161 <https://github.com/Lightning-AI/lightning/issues/18161>
).Fixed
^^^^^
(
#​160 <https://github.com/omni-us/jsonargparse/issues/160>
__).#​404 <https://github.com/omni-us/jsonargparse/issues/404>
__).Changed
^^^^^^^
(
lightning#18731 <https://github.com/Lightning-AI/lightning/issues/18731>
__).JSONARGPARSE_DEBUG
must now have a non-empty value to enable debug mode.v4.25.0
Compare Source
Added
^^^^^
#​366 <https://github.com/omni-us/jsonargparse/issues/366>
__).extend_base_type
for easy creation and registering of customtypes that extend a base type (
#​195 <https://github.com/omni-us/jsonargparse/issue/195>
__).Annotated
types either ignoring the metadata or using it forvalidation in case of
pydantic types <https://docs.pydantic.dev/latest/api/types/>
__ (#​384 <https://github.com/omni-us/jsonargparse/issue/384>
__).Fixed
^^^^^
--print_config
fails when parser has shallow links.--print_config
used and parserhas subcommands (
#​311 <https://github.com/omni-us/jsonargparse/issue/311>
__).Callable
with multiple input arguments(
#​372 <https://github.com/omni-us/jsonargparse/issues/372>
__).None
(
lightning#18616 <https://github.com/Lightning-AI/lightning/issues/18616>
__).pydantic>=2.0.0
(#​361 <https://github.com/omni-us/jsonargparse/issue/361>
__).Changed
^^^^^^^
and provide a subcommand when a subcommand is required but not
given (
#​371 <https://github.com/omni-us/jsonargparse/pull/371>
__).compute_fn
fails, the error message will saythis (
#​311 <https://github.com/omni-us/jsonargparse/issue/311>
__).add_subclass_arguments
now shows a better error message when an emptytuple is given (
lightning#18546 <https://github.com/Lightning-AI/lightning/issues/18546>
__).#​195 <https://github.com/omni-us/jsonargparse/issue/195>
__).Union[type(default), Any]
.v4.24.1
Compare Source
Fixed
^^^^^
linked_targets
parameter from API Reference (#​317 <https://github.com/omni-us/jsonargparse/issues/317>
__).#​357 <https://github.com/omni-us/jsonargparse/issues/357>
__).kwargs.pop()
with conflicting defaults not setting theconditional default (
#​362 <https://github.com/omni-us/jsonargparse/issues/362>
__).ActionJsonSchema
not setting correctly defaults when schema usesoneOf
.print_config
steps not working whendefault_config_files
used due to the config file initially being empty (
#​367 <https://github.com/omni-us/jsonargparse/issues/367>
__).v4.24.0
Compare Source
Added
^^^^^
dump
for including link targets.decimal.Decimal
as a type.CLI
now accepts components as a dict, such that the keys define names ofthe subcommands (
#​334 <https://github.com/omni-us/jsonargparse/issues/334>
__).TYPE_CHECKING
blocks (#​337 comment <https://github.com/omni-us/jsonargparse/issues/337#issuecomment-1665055459>
__).ext_vars
for anActionJsonnet
argument can now have a default.ArgumentParser.add_instantiator
that enables developers toimplement custom instantiation (
#​170 <https://github.com/omni-us/jsonargparse/issues/170>
__).Deprecated
^^^^^^^^^^
ActionJsonnetExtVars
is deprecated and will be removed in v5.0.0. Insteaduse
type=dict
.v4.23.1
Compare Source
Fixed
^^^^^
save
fails when a link target is a required parameter nested in a subclass(
#​332 <https://github.com/omni-us/jsonargparse/issues/332>
__).typing.Literal
types skipped when typing_extensions is installed(
lightning#18184 <https://github.com/Lightning-AI/lightning/pull/18184>
__).class_from_function
failing when called on the same function multipletimes (
lightning#18180 <https://github.com/Lightning-AI/lightning/issues/18180>
__).ps
on windows.v4.23.0
Compare Source
Added
^^^^^
class_from_function
now have a valid import path(
#​309 <https://github.com/omni-us/jsonargparse/issues/309>
__).Fixed
^^^^^
env_prefix
is derived froma
prog
containing dashes.jsonargparse.typing
.ARG:
and missingENV:
in help whendefault_env=True
.typing.Literal
types skipped on python 3.9 when typing_extensions isinstalled (
lightning#18125 comment <https://github.com/Lightning-AI/lightning/pull/18125#issuecomment-1644797707>
__).Changed
^^^^^^^
including the name, and if available aliases and help.
default_env=True
include subcommand environment variable name.v4.22.1
Compare Source
Fixed
^^^^^
argument (
#​312 <https://github.com/omni-us/jsonargparse/issues/312>
__).class_from_function
not failing when return annotation is missing.add_subclass_arguments
with single base class and no docstring,incorrectly shown as tuple in help.
incorrectly shown in help.
lacking type and help.
v4.22.0
Compare Source
Added
^^^^^
os.PathLike
type.class_from_function
now supportsfunc_return
parameter to specify thereturn type of the function (
lightning-flash#1564 comment <https://github.com/Lightning-Universe/lightning-flash/pull/1564#discussion_r1218147330>
__).563 <https://peps.python.org/pep-0563/>
__from __future__ import annotations
(
#​120 <https://github.com/omni-us/jsonargparse/issues/120>
__).585 <https://peps.python.org/pep-0585/>
__ and604 <https://peps.python.org/pep-0604/>
__ for postponed evaluation of annotations(
#​120 <https://github.com/omni-us/jsonargparse/issues/120>
__).range
as a type.Fixed
^^^^^
attrs
fields with factory default causes parse to fail (#​299 <https://github.com/omni-us/jsonargparse/issues/299>
__).#​304 <https://github.com/omni-us/jsonargparse/issues/304>
__).Changed
^^^^^^^
_
prefix to module names to be explicit about non-public API.Deprecated
^^^^^^^^^^
_
prefix) nowgives a
DeprecationWarning
. From v5.0.0 these imports will fail.v4.21.2
Compare Source
Fixed
^^^^^
#​289 <https://github.com/omni-us/jsonargparse/issues/289>
__).fails.
v4.21.1
Compare Source
Fixed
^^^^^
using the curly braces syntax.
#​275 <https://github.com/omni-us/jsonargparse/issues/275>
__).v4.21.0
Compare Source
Added
^^^^^
#​243 <https://github.com/omni-us/jsonargparse/issues/243>
__).models <https://docs.pydantic.dev/usage/models/>
__ andattrs
define <https://www.attrs.org/en/stable/examples.html>
__ similar todataclasses.
pydantic types <https://docs.pydantic.dev/usage/types/#pydantic-types>
__.585 <https://peps.python.org/pep-0585/>
__ and604 <https://peps.python.org/pep-0604/>
__ syntax.Fixed
^^^^^
str
parameter in subclass incorrectly parsed as dict with implicitnull
value (
#​262 <https://github.com/omni-us/jsonargparse/issues/262>
__).lightning#17254 <https://github.com/Lightning-AI/lightning/issues/17254>
__).dataclass
from pydantic not working (#​100 comment <https://github.com/omni-us/jsonargparse/issues/100#issuecomment-1408413796>
__).add_dataclass_arguments
not forwardingsub_configs
parameter.lightning#17263 <https://github.com/Lightning-AI/lightning/issues/17263>
__).Changed
^^^^^^^
setup.cfg
topyproject.toml
for configuration.build_sphinx
fromsetup.py
and documented how to build.(
lightning#17247 <https://github.com/Lightning-AI/lightning/issues/17247>
__).signatures
extras now installs thetyping-extensions
package onpython<=3.9.
CLI
now when given a class without methods, the class instance isreturned.
Deprecated
^^^^^^^^^^
v4.20.1
Compare Source
Fixed
^^^^^
(
lightning#15340 comment <https://github.com/Lightning-AI/lightning/issues/15340#issuecomment-1439203008>
__).discard_init_args_on_class_path_change
to handle more nestedcontexts (
#​247 <https://github.com/omni-us/jsonargparse/issues/247>
__).init=False
(#​252 <https://github.com/omni-us/jsonargparse/issues/252>
__)..init_args.
is included in argument (#​251 <https://github.com/omni-us/jsonargparse/issues/251>
__).v4.20.0
Compare Source
Added
^^^^^
CLI
support for callable class instances (#​238 <https://github.com/omni-us/jsonargparse/issues/238>
__).add_dataclass_arguments
now supports thefail_untyped
parameter (#​241 <https://github.com/omni-us/jsonargparse/issues/241>
__).Fixed
^^^^^
add_subcommands
fails when parser has required argument and default configavailable (
#​232 <https://github.com/omni-us/jsonargparse/issues/232>
__).Changed
^^^^^^^
argparse.ArgumentError
is raised instead ofParserError
.fail_untyped=True
(#​137 <https://github.com/omni-us/jsonargparse/issues/137>
__).CLI
no longer uses the module's docstring as main parser description (#​245 <https://github.com/omni-us/jsonargparse/issues/245>
__).Deprecated
^^^^^^^^^^
skip_check
parameter is deprecated and will be removed in v5.0.0.Instead use as type
str
oros.PathLike
.without a setter and two renamed:
rel_path -> relative
andabs_path -> absolute
.ActionPathList
is deprecated and will be removed in v5.0.0. Instead use astype
List[<path_type>]
withenable_path=True
.ArgumentParser.error_handler
is deprecated and will be removed in v5.0.0.Instead use the new exit_on_error parameter from argparse.
v4.19.0
Compare Source
Added
^^^^^
CLI
now supports thefail_untyped
andparser_class
parameters.bytes
andbytearray
registered on first use and decodes from standardBase64.
random.randint
.a previous parse link and vice versa (
#​208 <https://github.com/omni-us/jsonargparse/issues/208>
__).*.pyi
.open
andrelative_path_context
.os.PathLike
protocol.cc
to not require the parent directory to exists but that itcan be created.
#​171 <https://github.com/omni-us/jsonargparse/issues/171>
__).Fixed
^^^^^
PyLaia#48 <https://github.com/jpuigcerver/PyLaia/issues/48>
__).init_args
afterclass_path
change causes error (#​205 <https://github.com/omni-us/jsonargparse/issues/205>
__).fail_untyped=False
not propagated to subclass--*.help
actions.Path
is cast tostr
andrel_path
was changed.#​208 <https://github.com/omni-us/jsonargparse/issues/208>
__).Changed
^^^^^^^
target key does not have
init_args
(lightning#16032 <https://github.com/Lightning-AI/lightning/issues/16032>
__).signatures
extras now installs thetypeshed-client
package.validators
package is no longer a dependency.str
.init_args
warning changed to log at debug level.v4.18.0
Compare Source
Added
^^^^^
class instance.
Fixed
^^^^^
bool
values should not be accepted byint
orfloat
types.parse_string
raisesAttributeError
when given a simple string.return_parser
deprecation warning whenCLI
hassubcommands.
#​196 <https://github.com/omni-us/jsonargparse/issues/196>
__).default_config_files
set in a subcommandsubparser (
lightning#15256 <https://github.com/Lightning-AI/lightning/issues/15256>
__).Callable
with class return type.init_args
not discarded for nested subclasses provided through commandline (
lightning#15796 <https://github.com/Lightning-AI/lightning/issues/15796>
__).Namespace
when key is the same as a methodname.
Changed
^^^^^^^
CLI
no longer adds--config
and--print_config
if no argumentsadded to subcommand.
CLI
now uses the component's docstring short description for subparserdescriptions.
redundancy for
Union
types.v4.17.0
Compare Source
Added
^^^^^
(
#​187 <https://github.com/omni-us/jsonargparse/issues/187>
__).**kwargs
use in multiple calls (#​187 comment <https://github.com/omni-us/jsonargparse/issues/187#issuecomment-1295141338>
__).Fixed
^^^^^
str
type fails to parse value when pyyaml raisesConstructorError
(
#​189 <https://github.com/omni-us/jsonargparse/issues/189>
__).Namespace
clone should not deepcopy leaf values (#​187 <https://github.com/omni-us/jsonargparse/issues/187>
__)._ActionHelpClassPath
actions fail to instantiate when base class uses newunion type syntax.
Changed
^^^^^^^
--print_config
.pathlib.Path
types so that they are not shown as subclasstypes.
v4.16.0
Compare Source
Added
^^^^^
Any
now parses and instantiates classes when given dict that followssubclass specification (
lightning#15115 <https://github.com/Lightning-AI/lightning/issues/15115>
__).produces a callable that returns an instance of the class.
Fixed
^^^^^
#​178 <https://github.com/omni-us/jsonargparse/issues/178>
__).#​183 <https://github.com/omni-us/jsonargparse/issues/183>
__).Changed
^^^^^^^
set_defaults
on a config argument raises error and suggests to usedefault_config_files
(lightning#15174 <https://github.com/Lightning-AI/lightning/issues/15174>
__).(
#​169 <https://github.com/omni-us/jsonargparse/issues/169>
__).v4.15.2
Compare Source
Fixed
^^^^^
6e7ae6d <https://github.com/omni-us/jsonargparse/commit/6e7ae6dca41d2bdf081731c042bba9d08b6f228f>
__that produced cryptic error message when an invalid argument given (
#​172 <https://github.com/omni-us/jsonargparse/issues/172>
__).default_env
not forwarded to subcommand parsers, causing environmentvariable names to not be shown in subcommand help (
lightning#12790 <https://github.com/Lightning-AI/lightning/issues/12790>
__).init_args
without passing theclass_path
(
#​174 <https://github.com/omni-us/jsonargparse/issues/174>
__).Union
not being considered.str
type fails to parse values of the form^\w+: *
.parse_object
does not consider given namespace for previousclass_path
values.
v4.15.1
Compare Source
Fixed
^^^^^
compute_fn
of an argument link applied on parse not given subclass defaultinit_args
when loading from config.--*.help
option not available when type is aUnion
mixed withnot subclass types.
dict_kwargs
items from command line not working.init_args
given through command line not beingconsidered (
lightning#15007 <https://github.com/Lightning-AI/lightning/pull/15007>
__).Union
types required all subtypes to be supported when expected to be atleast one subtype supported (
#​168 <https://github.com/omni-us/jsonargparse/issues/168>
__).v4.15.0
Compare Source
Added
^^^^^
set_defaults
now supports subclass by name and normalization of import path.Fixed
^^^^^
init_args
whenclass_path
not a subclass.arguments (
#​161 comment <https://github.com/omni-us/jsonargparse/issues/161#issuecomment-1256973565>
__).**kwargs
when*args
present in parameter resolver.class_path
not discardinginit_args
when loading fromconfig file.
compute_fn
of a argument link applied on parsewithout showing an understandable error message.
Changed
^^^^^^^
UUID
andtimedelta
types are registered on first use to avoidpossibly unused imports.
add_class_arguments
will not add config load option if no added arguments.v4.14.1
Compare Source
Fixed
^^^^^
import_docstring_parse
a deprecated function only forpytorch-lightning backward compatibility.
v4.14.0
Compare Source
Added
^^^^^
os.PathLike
as typehint (#​159 <https://github.com/omni-us/jsonargparse/issues/159>
__).Type[<type>]
.#​150 <https://github.com/omni-us/jsonargparse/issues/150>
__).Fixed
^^^^^
#​159 <https://github.com/omni-us/jsonargparse/issues/159>
__).default_config_files
in subcommands (#​157 <https://github.com/omni-us/jsonargparse/issues/157>
__).v4.13.3
Compare Source
Fixed
^^^^^
#​158 <https://github.com/omni-us/jsonargparse/issues/158>
__).default_config_files
(#​157 <https://github.com/omni-us/jsonargparse/issues/157>
__).v4.13.2
Compare Source
Fixed
^^^^^
object
used as type hint.v4.13.1
Compare Source
Fixed
^^^^^
init_args
from commandline and the subclass default set as a dict.
v4.13.0
Compare Source
Added
^^^^^
(
#​133 comment <https://github.com/omni-us/jsonargparse/issues/133#issuecomment-1194305222>
__).super()
with non-immediate method resolution order parameter (#​153 <https://github.com/omni-us/jsonargparse/issues/153>
__).Fixed
^^^^^
#​151 <https://github.com/omni-us/jsonargparse/issues/151>
__).dict_kwargs
command line arguments only the last one waskept.
list
with subtype causing crash (#​154 <https://github.com/omni-us/jsonargparse/issues/154>
__).v4.12.0
Compare Source
Added
^^^^^
cls()
class instantiation inclassmethod
(
#​146 <https://github.com/omni-us/jsonargparse/issues/146>
__).pop
andget
from**kwargs
.Fixed
^^^^^
file:///
scheme not working in windows (#​144 <https://github.com/omni-us/jsonargparse/issues/144>
__).--*.help
.(
#​148 <https://github.com/omni-us/jsonargparse/issues/148>
__).init_args
onclass_path
change not working forUnion
with mixed non-subclass types.
JSONARGPARSE_DEBUG
set.Changed
^^^^^^^
compute function.
#​146 <https://github.com/omni-us/jsonargparse/issues/146>
__).**kwargs
use in property.v4.11.0
Compare Source
Added
^^^^^
env_prefix
property now also accepts boolean. If set to False, no prefixis used for environment variable names (
#​145 <https://github.com/omni-us/jsonargparse/pull/145>
__).link_arguments
support target being an entire subclass object(
lightning#13539 <https://github.com/Lightning-AI/lightning/discussions/13539>
__).Fixed
^^^^^
#​143 <https://github.com/omni-us/jsonargparse/issues/143>
__).Deprecated
^^^^^^^^^^
env_prefix
property will no longer acceptNone
in v5.0.0.v4.10.2
Compare Source
Fixed
^^^^^
self._kwargs
assign when a type hint is added.v4.10.1
Compare Source
Fixed
^^^^^
#​141 <https://github.com/omni-us/jsonargparse/issues/141>
__).default_config_files
not shown in help when argument has nodefault.
init_args
in later config overwrites instead of updates (#​142 <https://github.com/omni-us/jsonargparse/issues/142>
__).v4.10.0
Compare Source
Added
^^^^^
(
lightning#11653 <https://github.com/Lightning-AI/lightning/issues/11653>
__).#​114 <https://github.com/omni-us/jsonargparse/issues/114>
__).init_args
but noclass_path
(#​113 <https://github.com/omni-us/jsonargparse/issues/113>
__).Fixed
^^^^^
dump
withskip_default=True
not working for subclasses withoutinit_args
and when a default value requires serializing.JSONARGPARSE_DEFAULT_ENV
should have precedence over given value.message about the init arg instead of the class.
print_config
could output invalid values. Now a lenientcheck is done while dumping.
'-'
incorrectly parsed as[None]
.Changed
^^^^^^^
dataclasses
no longer an optional, now an install require on python 3.6.POSITIONAL_OR_KEYWORD
now consideredKEYWORD
(#​98 <https://github.com/omni-us/jsonargparse/issues/98>
__).JSONARGPARSE_DEBUG
now also sets the reconplogger level toDEBUG
.test_*.py
pattern.bool(Namespace())
evaluates toFalse
.class_path
is overridden, now only the config values that the newsubclass doesn't accept are discarded.
Deprecated
^^^^^^^^^^
logger
property will no longer acceptNone
in v5.0.0.v4.9.0
Compare Source
Fixed
^^^^^
LoggerProperty.__init__
.Union[type, List[type]
when previous value isNone
then--arg+=elem
should result in a list with single element.Changed
^^^^^^^
Literal
options now shown in metavar like choices (#​106 <https://github.com/omni-us/jsonargparse/issues/106>
__).tuple
metavar now shown as[ITEM,...]
.None
default now shown without brackets in usage.--print_config
in help.v4.8.0
Compare Source
Added
^^^^^
#​85 <https://github.com/omni-us/jsonargparse/issues/85>
__).register_unresolvable_import_paths
function to allow getting theimport paths of objects that don't have a proper
__module__
attribute(
lightning#13092 <https://github.com/Lightning-AI/lightning/issues/13092>
__).init_args
whenclass_path
doesnot change (
#​89 <https://github.com/omni-us/jsonargparse/issues/89>
__).Changed
^^^^^^^
return_parser
tests to deprecated tests module.v4.7.3
Compare Source
Fixed
^^^^^
sub_add_kwargs
not propagated for parameters of final classes.#​136 <https://github.com/omni-us/jsonargparse/issues/136>
__).v4.7.2
Compare Source
Fixed
^^^^^
import_docstring_parse
backward compatible to support releasedversions of
LightningCLI
(lightning#12918 <https://github.com/Lightning-AI/lightning/pull/12918>
__).v4.7.1
Compare Source
Fixed
^^^^^
lightning#12883 <https://github.com/Lightning-AI/lightning/issues/12883>
__).v4.7.0
Compare Source
Fixed
^^^^^
#​135 <https://github.com/omni-us/jsonargparse/issues/135>
__).Changed
^^^^^^^
@final
decorator now an import from typing_extensions if available.ActionsContainer
to show respective methods in documentation.v4.6.0
Compare Source
Added
^^^^^
#​91 <https://github.com/omni-us/jsonargparse/issues/91>
__).class_path
only by name for known subclasses (#​84 <https://github.com/omni-us/jsonargparse/issues/84>
__).add_argument
with subclass type now also adds--*.help
option..init_args.
.Literal
backport from typing_extensions on python 3.7.--*.help CLASS
options.Changed
^^^^^^^
class_path
's on parse are now normalized to shortest form.v4.5.0
Compare Source
Added
^^^^^
capture_parser
function to get the parser object from a cli function.dump_header
property to set header for yaml/jsonnet dumpers (#​79 <https://github.com/omni-us/jsonargparse/issues/79>
__).Callable
type now supports callable classes (#​110 <https://github.com/omni-us/jsonargparse/issues/110>
__).Fixed
^^^^^
class_path
,init_args
dicts.Changed
^^^^^^^
Callable
no longer a simple registered type.Callable
default now shown in help as full import path.(
#​129 <https://github.com/omni-us/jsonargparse/issues/129>
__).source --> target
.Deprecated
^^^^^^^^^^
CLI
'sreturn_parser
parameter will be removed in v5.0.0.v4.4.0
Compare Source
Added
^^^^^
JSONARGPARSE_DEFAULT_ENV
to enable environment variable parsing.JSONARGPARSE_DEBUG
to print of stack trace on parse failure.Fixed
^^^^^
lightning#12303 <https://github.com/Lightning-AI/lightning/issues/12303>
__).Changed
^^^^^^^
v4.3.1
Compare Source
Fixed
^^^^^
yaml_load
with jsonnet parser mode (#​125 <https://github.com/omni-us/jsonargparse/issues/125>
__).#​125 <https://github.com/omni-us/jsonargparse/issues/125>
__).Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Renovate Bot.